BEGIN TRANSACTION;
BEGIN TRY
    UPDATE Accounts SET Balance = Balance - 100 WHERE AccountID = 'A001';
    UPDATE Accounts SET Balance = Balance + 100 WHERE AccountID = 'B002';
    COMMIT TRANSACTION;  -- 全部成功则提交
END TRY
BEGIN CATCH
    ROLLBACK TRANSACTION;  -- 任一失败则回滚
    THROW;
END CATCH;
